<?php 
## include required files
/*******************************/
require_once '../model/forums.php';
require_once '../model/users.php';
/*******************************/
## Create Objects
/*******************************/
$forumObj = new Model_Forums();
$userObj = new Model_Users();
/*******************************/

if($_GET['id']!='') {
	$id=base64_decode($_GET['id']);
	$smarty->assign('page', $_GET['page']);
	$forumcommentArray = $forumObj->getForumCommentDetailsById($id);
	/************** Get user Details By whom added the forum *****************/
	$user_id = $forumcommentArray['user_id'];
	if($user_id==1)
	{
		$user_name = 'Admin';
	}
	else
	{
		$user_name = $userObj->getUserNameByUserId($user_id);
	}
	$smarty->assign('user_name',$user_name);
	/**************End For Get user Details By whom added the forum****************/
	$smarty->assign('forumcommentArray',$forumcommentArray);
}

## Set active class variable for left menu
$smarty->assign('activeclass','forums');
$smarty->assign('mainmenu', '3');

## Unset all the objects created which are on this page
unset($forumObj);
unset($userObj);

$smarty->display(TEMPLATEDIR_ADMIN. 'forums/forumdetailscomment.tpl');
unset($smarty);
?>